<?php if (hasPermission("namespaces.object.create.dynamic")): ?>
	<form action="<?php echo Gene::makeLink($object) ?>/new/dynamic" method="post">
	
	<fieldset>
	<legend>Create Dynamic Page</legend>
	
	<?php if ($draft): ?>
		<input type="hidden" name="draftid" value="<?php echo $draft['draft_id'] ?>" />
	<?php endif; ?>
	
	<p class="fieldlabel"><label for="pagetitle">Page Title:</label></p>
	<p class="field"><input type="text" id="pagetitle" name="objtitle" size="32" class="required" value="<?php _e($title) ?>" /></p>
	
	<p class="fieldlabel"><label for="pagedesc">Page Description: <em>(Optional)</em></label></p>
	<p class="field"><input type="text" id="pagedesc" name="objdesc" size="64" value="<?php _e($description) ?>" /></p>
	
	<p class="fieldlabel"><label for="script">Script:</label></p>
	<p class="field"><select name="objcontent" id="script">
	<?php foreach ($dynamicscripts as $i): ?>
		<option value="<?php _e($i) ?>"><?php _e($i) ?></option>
	<?php endforeach; ?>
	</select></p>
	
	<p class="formcontrols"><input type="submit" value="Create Dynamic Page" class="btn_focus" /></p>
	
	</fieldset>
	
	</form>
<?php endif; ?>